<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="blog/layout" th:with="title='',active='home'">
<header th:replace="blog/layout::headerFragment(${title},${active})"></header>
<body>
<div layout:fragment="content">
    <div class="content-wrap">
        <div id="content" class="content">
            <section id="posts" class="posts-expand">
                <th:block th:each="post : ${articles.list}">
                    <article class="post post-type-normal">
                        <header class="post-header">
                            <h1 class="post-title">
                                <a class="post-title-link" th:href="@{'/detail/'+${post.cid}}" th:text="${post.title}"></a>
                            </h1>
                            <div class="post-meta">
                                <span class="post-time">
                                    <span class="post-meta-item-icon">
                                        <i class="fa fa-calendar-o"></i>
                                    </span>
                                    <span class="post-meta-item-text">发表于</span>
                                    <time title="创建于" datetime="" th:text="${commons.fmtdate(post.created, 'yyyy-MM-dd')}"></time>
                                </span>
                                <span class="post-category">
                                    <span class="post-meta-divider">|</span>
                                    <span class="post-meta-item-icon">
                                        <i class="fa fa-folder-o"></i>
                                    </span>
                                    <span class="post-meta-item-text">分类于</span>
                                    <span>
                                        <a th:href="@{'/categories/'} + ${post.categories}" rel="index">
                                            <span th:text="${post.categories}"></span>
                                        </a>
                                    </span>
                                </span>
                                <span class="post-comments-count">
                                    <span class="post-meta-divider">|</span>
                                    <span class="post-meta-item-icon">
                                      <i class="fa fa-comment-o"></i>
                                    </span>
                                    <a href="#comments">
                                      <span class="post-comments-count disqus-comment-count" data-disqus-identifier="" th:text="${post.commentsNum} +' Comments'"></span>
                                    </a>
                                </span>
                                <span id="" class="leancloud_visitors" data-flag-title="">
                                    <span class="post-meta-divider">|</span>
                                    <span class="post-meta-item-icon">
                                        <i class="fa fa-eye"></i>
                                    </span>
                                    <span class="post-meta-item-text">阅读次数</span>
                                    <span class="leancloud-visitors-count" th:text="${post.hits}"></span>
                                </span>
                            </div>
                        </header>

                        <div class="post-body">
                            <th:block th:utext="${commons.article(commons.subStr(post.content,250))}"></th:block>
                        </div>
                        <!--noindex-->
                        <div class="post-button text-center">
                            <a class="btn" th:href="@{'/detail/'+${post.cid}}" rel="contents">
                                阅读全文 »
                            </a>
                        </div>
                        <!--/noindex-->

                        <footer class="post-footer">
                            <div class="post-eof"></div>
                        </footer>
                    </article>
                </th:block>
            </section>
            <!--分页-->
            <div class="lists-navigator clearfix">
                <div th:replace="comm/pagination::pageNav(${articles})"></div>
            </div>
        </div>
    </div>
</div>
</body>
</html>